/**
 * @title HHIndexAction.java 
 * @description 	网站用户主页
 * @create 			2012-8-5 下午4:43:57 By xjiujiu
 * @package 		apps.site.action
 * @copyright 		Copyright (c) 2011-2012 http://xyrj.hhtc.edu.cn.com. All right reserved
 * @version         $Id$
 * XYRJ-Java-Project
 */

package apps.site.action;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import system.pojo.HHSymdetailPojo;
import system.pojo.HHNewsarticlePojo;
import system.pojo.HHQuestionPojo;

import apps.site.model.HHCaseModel;
import apps.site.model.HHNewsModel;
import apps.site.model.HHProInfoModel;

import com.xyrj.mvc.HHAction;

/**
 * 
 * @description
 * 
 * @classname HHIndexAction
 * @author xjiujiu<xjiujiu@foxmail.com>
 * @date 2012-8-5 下午4:43:57
 * @version 1.0
 */
public class HHIndexAction extends HHAction {

	/**
	 * 
	 * @description
	 * 
	 * @param request
	 * @param response
	 */
	public HHIndexAction(HttpServletRequest request,
			HttpServletResponse response) {
		super(request, response);
	}
	
	/**
	 * 首页方法
	 * 
	 * @description
	 * 
	 * @title index
	 * @return void
	 */
	public void index() {
		this._getIndexNewsList();
		this._getIndexProInfoList();
		this._getIndexCaseList();
		this._view.theme("index.jsp");
	}

	/**
	 * @Description: 首页展示最新动态列表
	 * 
	  * @Title: _getIndexNewsList
	  * @return void    返回类型
	  * @throws
	 */
	protected void _getIndexNewsList() {
		HHNewsModel news = new HHNewsModel(new HHNewsarticlePojo());
		List<Map> indexNewsList = news.getIndexList();
		this._view.setRequestAttr("indexNewsList", indexNewsList);
	}
	/**
	 * @Description: 首页展示产品信息列表
	  * 
	  * @Title: _getIndexProInfoList
	  * @return void    返回类型
	  * @throws
	 */
	protected void _getIndexProInfoList() {
		HHProInfoModel proinfo = new HHProInfoModel(new HHQuestionPojo());
		List<Map> indexProinfoList = proinfo.getIndexList();
		this._view.setRequestAttr("indexProInfoList", indexProinfoList);
	}
	
	/**
	 * @Description: 首页展示案例列表
	 * 
	  * @Title: _getIndexCaseList
	  * @return void    返回类型
	  * @throws
	 */
	protected void _getIndexCaseList()
	{
		HHCaseModel caseModel = new HHCaseModel(new HHSymdetailPojo());
		List<Map> indexCaseList 	= caseModel.getIndexList();
		this._view.setRequestAttr("indexCaseList", indexCaseList);
	}
	
}
